package com.pgybook.db.entity.domain;

import java.util.ArrayList;
import java.util.List;

public class BookPictureEx {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BookPictureEx() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPictureidIsNull() {
            addCriterion("PICTUREID is null");
            return (Criteria) this;
        }

        public Criteria andPictureidIsNotNull() {
            addCriterion("PICTUREID is not null");
            return (Criteria) this;
        }

        public Criteria andPictureidEqualTo(Long value) {
            addCriterion("PICTUREID =", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidNotEqualTo(Long value) {
            addCriterion("PICTUREID <>", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidGreaterThan(Long value) {
            addCriterion("PICTUREID >", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidGreaterThanOrEqualTo(Long value) {
            addCriterion("PICTUREID >=", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidLessThan(Long value) {
            addCriterion("PICTUREID <", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidLessThanOrEqualTo(Long value) {
            addCriterion("PICTUREID <=", value, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidIn(List<Long> values) {
            addCriterion("PICTUREID in", values, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidNotIn(List<Long> values) {
            addCriterion("PICTUREID not in", values, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidBetween(Long value1, Long value2) {
            addCriterion("PICTUREID between", value1, value2, "pictureid");
            return (Criteria) this;
        }

        public Criteria andPictureidNotBetween(Long value1, Long value2) {
            addCriterion("PICTUREID not between", value1, value2, "pictureid");
            return (Criteria) this;
        }

        public Criteria andBookidIsNull() {
            addCriterion("BOOKID is null");
            return (Criteria) this;
        }

        public Criteria andBookidIsNotNull() {
            addCriterion("BOOKID is not null");
            return (Criteria) this;
        }

        public Criteria andBookidEqualTo(Long value) {
            addCriterion("BOOKID =", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotEqualTo(Long value) {
            addCriterion("BOOKID <>", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidGreaterThan(Long value) {
            addCriterion("BOOKID >", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidGreaterThanOrEqualTo(Long value) {
            addCriterion("BOOKID >=", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidLessThan(Long value) {
            addCriterion("BOOKID <", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidLessThanOrEqualTo(Long value) {
            addCriterion("BOOKID <=", value, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidIn(List<Long> values) {
            addCriterion("BOOKID in", values, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotIn(List<Long> values) {
            addCriterion("BOOKID not in", values, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidBetween(Long value1, Long value2) {
            addCriterion("BOOKID between", value1, value2, "bookid");
            return (Criteria) this;
        }

        public Criteria andBookidNotBetween(Long value1, Long value2) {
            addCriterion("BOOKID not between", value1, value2, "bookid");
            return (Criteria) this;
        }

        public Criteria andMainpicIsNull() {
            addCriterion("MAINPIC is null");
            return (Criteria) this;
        }

        public Criteria andMainpicIsNotNull() {
            addCriterion("MAINPIC is not null");
            return (Criteria) this;
        }

        public Criteria andMainpicEqualTo(Boolean value) {
            addCriterion("MAINPIC =", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicNotEqualTo(Boolean value) {
            addCriterion("MAINPIC <>", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicGreaterThan(Boolean value) {
            addCriterion("MAINPIC >", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicGreaterThanOrEqualTo(Boolean value) {
            addCriterion("MAINPIC >=", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicLessThan(Boolean value) {
            addCriterion("MAINPIC <", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicLessThanOrEqualTo(Boolean value) {
            addCriterion("MAINPIC <=", value, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicIn(List<Boolean> values) {
            addCriterion("MAINPIC in", values, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicNotIn(List<Boolean> values) {
            addCriterion("MAINPIC not in", values, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicBetween(Boolean value1, Boolean value2) {
            addCriterion("MAINPIC between", value1, value2, "mainpic");
            return (Criteria) this;
        }

        public Criteria andMainpicNotBetween(Boolean value1, Boolean value2) {
            addCriterion("MAINPIC not between", value1, value2, "mainpic");
            return (Criteria) this;
        }

        public Criteria andDisplayorderIsNull() {
            addCriterion("DISPLAYORDER is null");
            return (Criteria) this;
        }

        public Criteria andDisplayorderIsNotNull() {
            addCriterion("DISPLAYORDER is not null");
            return (Criteria) this;
        }

        public Criteria andDisplayorderEqualTo(Integer value) {
            addCriterion("DISPLAYORDER =", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderNotEqualTo(Integer value) {
            addCriterion("DISPLAYORDER <>", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderGreaterThan(Integer value) {
            addCriterion("DISPLAYORDER >", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderGreaterThanOrEqualTo(Integer value) {
            addCriterion("DISPLAYORDER >=", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderLessThan(Integer value) {
            addCriterion("DISPLAYORDER <", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderLessThanOrEqualTo(Integer value) {
            addCriterion("DISPLAYORDER <=", value, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderIn(List<Integer> values) {
            addCriterion("DISPLAYORDER in", values, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderNotIn(List<Integer> values) {
            addCriterion("DISPLAYORDER not in", values, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderBetween(Integer value1, Integer value2) {
            addCriterion("DISPLAYORDER between", value1, value2, "displayorder");
            return (Criteria) this;
        }

        public Criteria andDisplayorderNotBetween(Integer value1, Integer value2) {
            addCriterion("DISPLAYORDER not between", value1, value2, "displayorder");
            return (Criteria) this;
        }

        public Criteria andPicformatIsNull() {
            addCriterion("PICFORMAT is null");
            return (Criteria) this;
        }

        public Criteria andPicformatIsNotNull() {
            addCriterion("PICFORMAT is not null");
            return (Criteria) this;
        }

        public Criteria andPicformatEqualTo(String value) {
            addCriterion("PICFORMAT =", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatNotEqualTo(String value) {
            addCriterion("PICFORMAT <>", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatGreaterThan(String value) {
            addCriterion("PICFORMAT >", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatGreaterThanOrEqualTo(String value) {
            addCriterion("PICFORMAT >=", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatLessThan(String value) {
            addCriterion("PICFORMAT <", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatLessThanOrEqualTo(String value) {
            addCriterion("PICFORMAT <=", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatLike(String value) {
            addCriterion("PICFORMAT like", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatNotLike(String value) {
            addCriterion("PICFORMAT not like", value, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatIn(List<String> values) {
            addCriterion("PICFORMAT in", values, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatNotIn(List<String> values) {
            addCriterion("PICFORMAT not in", values, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatBetween(String value1, String value2) {
            addCriterion("PICFORMAT between", value1, value2, "picformat");
            return (Criteria) this;
        }

        public Criteria andPicformatNotBetween(String value1, String value2) {
            addCriterion("PICFORMAT not between", value1, value2, "picformat");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("STATUS is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("STATUS is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("STATUS =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("STATUS <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("STATUS >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("STATUS >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("STATUS <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("STATUS <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("STATUS in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("STATUS not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("STATUS between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("STATUS not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andSizeIsNull() {
            addCriterion("SIZE is null");
            return (Criteria) this;
        }

        public Criteria andSizeIsNotNull() {
            addCriterion("SIZE is not null");
            return (Criteria) this;
        }

        public Criteria andSizeEqualTo(Integer value) {
            addCriterion("SIZE =", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeNotEqualTo(Integer value) {
            addCriterion("SIZE <>", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeGreaterThan(Integer value) {
            addCriterion("SIZE >", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeGreaterThanOrEqualTo(Integer value) {
            addCriterion("SIZE >=", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeLessThan(Integer value) {
            addCriterion("SIZE <", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeLessThanOrEqualTo(Integer value) {
            addCriterion("SIZE <=", value, "size");
            return (Criteria) this;
        }

        public Criteria andSizeIn(List<Integer> values) {
            addCriterion("SIZE in", values, "size");
            return (Criteria) this;
        }

        public Criteria andSizeNotIn(List<Integer> values) {
            addCriterion("SIZE not in", values, "size");
            return (Criteria) this;
        }

        public Criteria andSizeBetween(Integer value1, Integer value2) {
            addCriterion("SIZE between", value1, value2, "size");
            return (Criteria) this;
        }

        public Criteria andSizeNotBetween(Integer value1, Integer value2) {
            addCriterion("SIZE not between", value1, value2, "size");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}